﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site/Master/Pop.Master" AutoEventWireup="true" CodeBehind="Comment.aspx.cs" Inherits="ECommerce.Web.Site.Comment" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="styles/discuss.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .star img
        {
            cursor:pointer;
        }
        
        .style1
        {
        	width:70px; text-align:right; height:30px; padding-right:10px;
        }
    </style>

    <script type="text/javascript">
        $(function ()
        {
            $(".star img").bind("click", function ()
            {
                var index = parseInt($(this).attr("id").substring(3));

                for (var i = 1; i <= index; i++)
                {
                    $("#img" + i).attr("src", "images/d1.gif?");
                }

                for (var j = index + 1; j <= 5; j++)
                {
                    $("#img" + j).attr("src", "images/d2.gif?");
                }

                $("#<%=hidScore.ClientID %>").val(index);
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="discuss">
        <p>
            <span class="weight">请填写评论</span>（<em>*</em>为必填选项）<span style="cursor:pointer; margin-left:280px;" onclick="top.delDivFrm()">关闭</span></p>
        <div class="body" style="height:320px;">
            <table border="0" cellpadding="0" cellspacing="0">                
                <tr>
                    <td class="style1">
                        总体评价:<em>*</em><asp:HiddenField ID="hidScore" runat="server" Value="3" />
                    </td>
                    <td class="style2">
                        <span class="star">
                            <img id="img1" src="images/d1.gif" /><img id="img2" src="images/d1.gif" /><img id="img3"
                                src="images/d1.gif" /><img id="img4" src="images/d2.gif" /><img id="img5" src="images/d2.gif" /></span>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        价格:<em>*</em>
                    </td>
                    <td class="style2">
                        <asp:DropDownList ID="drpPrice" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        口味:<em>*</em>
                    </td>
                    <td class="style2">
                        <asp:DropDownList ID="drpTaste" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        造型:<em>*</em>
                    </td>
                    <td class="style2">
                        <asp:DropDownList ID="drpSculpt" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        评价:<em>*</em>
                    </td>
                    <td class="style2">
                        <asp:TextBox ID="txtContent" TextMode="MultiLine" runat="server" MaxLength="100"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                    </td>
                    <td class="style2">
                        50-100个字
                     
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ControlToValidate="txtContent" Display="None" ErrorMessage="请输入评价内容"></asp:RequiredFieldValidator>
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                            ShowMessageBox="True" ShowSummary="False" />
                    </td>
                </tr>
            </table>            
            <div class="button">
                <asp:LinkButton ID="btnSave" runat="server" OnClick="btnSave_Click"><img src="images/d3.gif" /></asp:LinkButton>
            </div>
            <div style="height:20px; line-height:20px;"></div>
        </div>
    </div>
</asp:Content>
